home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 34 / 64er_Magazin_Sonderheft_34_19xx_Markt__Technik_de_Disk_1_of_2_Side_B.d64 / spg_demo char-ed (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  5KB  |  183 lines

  1. 10 ifpeek(49234)<>asc("s")thenload"spg.obj",8,1
  2. 20 sys49152
  3. 100 mm=0
  4. 105 !fd 0,126,254,130,130,130,130,130,254,0
  5. 110 !fd 0,127,254,254,254,254,254,254,254,0
  6. 120 !bc 190,191
  7. 125 t%(0)=128:fori=1to7:t%(i)=t%(i-1)/2:next
  8. 130 print"[147][142][154]";:poke53280,6:poke53281,6
  9. 140 !gr0;gn0;ge
  10. 150 fori=0to24:readj:!mb0,i,j:next
  11. 160 data 127,0,0,126,0,0,124,0,0,126,0,0,127,0,0,111,128,0,71,192,0,3,128,0,1
  12. 170 fori=0to24:readj:!mb1,i,j:next
  13. 175 data 127,0,0,66,0,0,68,0,0,66,0,0,81,0,0,104,128,0,68,64,0,2,128,0,1
  14. 180 fori=0to23:readj:!mb2,i,j:next
  15. 185 data 255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0
  16. 190 :
  17. 200 print"[147][155] [164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
  18. 210 print"   *** [160]c64 character-set editor [160]*** [160][154]"
  19. 220 !tf4,3,8,8,126;tc4,3,8,8,14
  20. 225 !ml1,2;mc1,11;mp1,1,0,0,0;mo1,1
  21. 228 print
  22. 230 print,,"edit","load"
  23. 232 print,,"clear","save"
  24. 234 print,,"mirror","reboot"
  25. 236 print,,"turn","revers"
  26. 238 print,,"rotate","copy"
  27. 240 print,,"autorev","exit"
  28. 250 fori=0to7:forj=0to31:!tf4+j,13+i,1,1,32*i+j:nextj,i:!tc4,13,32,8,14
  29. 260 m1=0:m2=0:ch=0:dim cc(7)
  30. 270 :
  31. 300 ba=13*4096+8*ch:!tc4,13,32,8,14:!tc4+(chand31),13+ch/32,1,1,15
  32. 301 !mx1,8*(7+(chand31)),154+8*int(ch/32)
  33. 310 print"[154]";:forj=0to7:!bp4,3+j,ba+j:cc(j)=peek(1024):next
  34. 320 !tc20,4,20,7,14;tc20+10*m2,4+m1,10,1,15
  35. 325 gosub50000
  36. 330 ifpy>12then500
  37. 340 if(px>3)and(px<12)and(py>2)and(py<11)then1000
  38. 350 if(px>19)and(py>3)and(py<10)then400
  39. 360 goto325
  40. 400 m2=-(px>29):m1=py-4
  41. 405 ifm2=0then320
  42. 410 onm1+1goto900,800,460,320,320,420
  43. 420 !pt40960: rem exit
  44. 430 !tp10,8,"[159][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
  45. 432 !tp10,9," do you really want "
  46. 434 !tp10,10,"     to exit  ?[160]    "
  47. 440 gosub50300:ifynthen:!fo:end
  48. 450 !rt40960:m1=0:m2=0:goto320
  49. 460 !pt40960: rem reboot
  50. 470 !tp10,8,"[159][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
  51. 472 !tp10,9," do you really want "
  52. 474 !tp10,10,"    to reboot  ?    "
  53. 480 gosub50300:ifynthenrun
  54. 490 !rt40960:m1=0:m2=0:goto320
  55. 500 rem select characters
  56. 510 if(px<4)or(px>35)or(py>20)then325
  57. 520 ch=32*(py-13)+px-4:goto300
  58. 800 !pt40960: rem save
  59. 810 !tp10,8,"[159][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
  60. 820 !tp10,9," save character-set "
  61. 830 !tp10,10,"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
  62. 840 gosub50400:ifcn$=""then490
  63. 850 !fs0,cn$,8:gosub50600:!mo1,1:goto490
  64. 900 !pt40960: rem load
  65. 910 !tp10,8,"[159][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
  66. 920 !tp10,9," load character-set "
  67. 930 !tp10,10,"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
  68. 940 gosub50400:ifcn$=""then490
  69. 950 !fl0,cn$,8:gosub50600:!mo1,1:goto490
  70. 1000 sx=px-4:sy=py-3:k=cc(sy):onm2+1goto1010,1020
  71. 1010 onm1+1goto1100,1200,1400,1300,1500,1600
  72. 1020 onm1+1goto1700,1800,100,1900,2000
  73. 1100 rem edit
  74. 1110 ifkandt%(sx)then1130
  75. 1120 cc(sy)=kort%(sx):gosub50100:goto1140
  76. 1130 cc(sy)=kand(255-t%(sx)):gosub50100
  77. 1140 print"[154]";:!bb4,py,cc(sy):goto325
  78. 1200 rem clear
  79. 1210 fori=0to7:cc(i)=0:next:gosub50100:goto300
  80. 1300 rem turn
  81. 1310 gosub50200
  82. 1320 onigoto1350,1330,1310,1310,300
  83. 1330 !mc0,0
  84. 1332 fori=0to7:cd(7-i)=0:forj=0to7:ifcc(j)andt%(i)thencd(7-i)=cd(7-i)ort%(j)
  85. 1340 next:next:goto1370
  86. 1350 !mc0,0
  87. 1352 fori=0to7:cd(i)=0:forj=0to7:ifcc(j)andt%(i)thencd(i)=cd(i)ort%(7-j)
  88. 1360 next:next
  89. 1370 fori=0to7:cc(i)=cd(i):next:gosub50100
  90. 1380 forj=0to7:!bp4,3+j,ba+j:next:!mc0,15:goto1310
  91. 1400 rem mirror
  92. 1410 gosub50200
  93. 1420 onigoto1430,1430,1450,1450,300
  94. 1430 !mc0,0
  95. 1432 fori=0to7:cd=0:forj=0to7:ifcc(i)andt%(j)thencd=cdort%(7-j)
  96. 1440 next:cc(i)=cd:next:goto1480
  97. 1450 !mc0,0
  98. 1452 fori=0to7:cd(i)=cc(7-i):next
  99. 1470 fori=0to7:cc(i)=cd(i):next
  100. 1480 gosub50100:forj=0to7:!bp4,3+j,ba+j:next:!mc0,15:goto1410
  101. 1500 rem rotate
  102. 1510 gosub50200:ifi=5then300
  103. 1520 !mc0,0:onigoto1530,1540,1550,1560
  104. 1530 fori=0to7:cc(i)=255and(cc(i)/2):next:goto1570
  105. 1540 fori=0to7:cc(i)=255and(cc(i)*2):next:goto1570
  106. 1550 fori=0to6:cc(7-i)=cc(6-i):next:cc(0)=0:goto1570
  107. 1560 fori=0to6:cc(i)=cc(i+1):next:cc(7)=0
  108. 1570 gosub50100
  109. 1580 forj=0to7:!bp4,3+j,ba+j:next:!mc0,15:goto1510
  110. 1600 rem autorev
  111. 1610 !rg1,53248;gk1,2,3;gn2;gi;pg2,60416;pg1,53248:goto300
  112. 1900 rem revers
  113. 1910 fori=0to7:cc(i)=255-cc(i):next:gosub50100:goto300
  114. 2000 rem copy
  115. 2010 !mc0,7:mm=1:gosub50000:if(px<4)or(px>35)or(py>20)or(py<13)then2010
  116. 2020 !mc0,15:mm=0:ch=32*(py-13)+px-4
  117. 2030 gosub50100:goto300
  118. 50000 rem maus-select-routine
  119. 50010 !mo0,1;ml0,0+mm;mx0,27+8*px,53+8*py
  120. 50020 ifpeek(198)=0then:!js:goto50020
  121. 50030 geti$:ifi$=chr$(13)then:!ml0,1:return
  122. 50040 ifi$="[145]"thenifpy>0thenpy=py-1
  123. 50050 ifi$=""thenifpx<39thenpx=px+1
  124. 50060 ifi$=""thenifpy<24thenpy=py+1
  125. 50070 ifi$="[157]"thenifpx>0thenpx=px-1
  126. 50080 goto50010
  127. 50100 rem storage-character
  128. 50110 forj=0to7:!fb0,ch,j,cc(j):next:return
  129. 50200 rem warten auf cursor-taste
  130. 50210 ifpeek(198)=0then:!js:goto50210
  131. 50220 geti$:i=1
  132. 50230 ifi$<>mid$("[157][145]"+chr$(13),i,1)theni=i+1:ifi<6then50230
  133. 50240 ifi=6then50210
  134. 50250 return
  135. 50300 rem nur yes oder no
  136. 50310 !tp10,11,"   [185][185][185][185][185]     [185][185][185][185]   "
  137. 50320 !tp10,12,"   [146] yes      [146] no    "
  138. 50330 !tp10,13,"   [184][184][184][184][184]     [184][184][184][184]   "
  139. 50340 gosub50000:ifpy<>12then50340
  140. 50350 if(px<13)or(px>17)then50370
  141. 50360 yn=1:return
  142. 50370 if(px<23)or(px>26)then50340
  143. 50380 yn=0:return
  144. 50400 rem namenseingabe
  145. 50405 !tp10,11," give name for set: "
  146. 50410 !tp10,12," [185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185] "
  147. 50420 !tp10,13," [146]>                  "
  148. 50430 !tp10,14," [184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184] "
  149. 50440 cn$=""
  150. 50450 !tf12,13,17,1,32;tp12,13,cn$+"[164]";
  151. 50460 wait198,63:geti$:i=asc(i$):ifi=13then50520
  152. 50465 ia=iand96:if(ia=0)and(i<>20)then50460
  153. 50470 ifiathen50500
  154. 50480 ifcn$=""then50460
  155. 50490 cn$=left$(cn$,len(cn$)-1):goto50450
  156. 50500 iflen(cn$)=16then50450
  157. 50510 cn$=cn$+i$:goto50450
  158. 50520 ifcn$<>"$"thenreturn
  159. 50530 !pt43008:print"[147][155]";
  160. 50540 !mo0,0;mo1,0:open1,8,0,"$":get#1,i$,i$:goto50550
  161. 50545 !js:ifpeek(198)>0thengeti$:printtab(35)" w ";:gosub50800:geti$
  162. 50547 ifi$="x"then50580
  163. 50548 print
  164. 50550 get#1,i$,i$,i$,j$:ifst>63then50580
  165. 50555 printasc(i$+chr$(0))+256*asc(j$+chr$(0));
  166. 50560 get#1,i$:printi$;:ifi$<>""then50560
  167. 50570 goto50545
  168. 50580 print"[164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
  169. 50590 print" press any key[160]"
  170. 50595 gosub50800:geti$:!rt43008:close1:!mo0,1;mo1,1:goto50440
  171. 50600 rem diskettenkanal abfragen
  172. 50610 open15,8,15:input#15,i1$,i2$,i3$,i4$:close15
  173. 50620 !tp4,16,"[153][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
  174. 50625 !tp4,17," [160]disk message :                "
  175. 50630 !tp4,18," [185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185] "
  176. 50640 !tp4,19," [146]                               "
  177. 50650 !tp4,20," [184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184] [155]"
  178. 50660 !tp6,19,i1$","i2$","i3$","i4$","
  179. 50670 gosub50800:geti$:return
  180. 50800 rem warten auf tastaturpuffer
  181. 50810 ifpeek(198)=0then:!js:goto50810
  182. 50820 return
  183.